package com.yizhe.service.impl;

import com.yizhe.dao.UserInfoMapper;
import com.yizhe.domain.UserInfo;
import com.yizhe.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * Created by Chris on 2016/11/11.
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Resource
    private UserInfoMapper userInfoMapper;

    public Integer saveUserInfo(UserInfo userInfo) {
        return userInfoMapper.insertEntity(userInfo);
    }

    public int selectUserInfoCount(UserInfo userInfo) {
        return (Integer) userInfoMapper.selectEntityCount(userInfo);
    }

	@Override
	public UserInfo selectUserInfo(UserInfo userInfo) {
		return userInfoMapper.selectEntity(userInfo);
	}

	@Override
	public Integer updateUserInfo(UserInfo userInfo) {
		return userInfoMapper.updateEntity(userInfo);
	}
}
